<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE HTML>
<html>
<head>
<base href="<%=basePath%>">

<title>My JSP 'index.jsp' starting page</title>
<link rel="stylesheet" href="css/bootstrap.min.css" />
<link rel="stylesheet" href="css/userInfo.css" />
<script type="text/javascript" src="js/jquery-3.1.1.min.js"></script>
<script type="text/javascript" src="ueditor/ueditor.config.js"></script>
<script type="text/javascript" src="ueditor/ueditor.all.min.js"></script>

</head>



<body>
	<!-- <iframe src="publicPage.html" width="100%" height="70px" scrolling="no" frameborder="0"> </iframe> -->

	<jsp:include page="publicPage.jsp"></jsp:include>
	<div class="container">
		<div class="row">
			<div class="loginInfo">
				<div class="personCenter">
					<div class="head_portrait">
						<img src="images/userImage.jpg" width="70" style="border:1px" />
					</div>
					<div class="lineBottom"></div>
					<div class="approve">
						<a href="#">认证:</a> <a href="#"> <img src="images/phone.png"
							width="24px" height="24px"> </a> <a href="#"> <img
							src="images/shot.png" width="20px" height="24px"> </a>
					</div>
					<div class="set">
						<a href="#">订单中心</a>
						<div class="setLine"></div>
						<a href="jsp/UpdatePwd.jsp">账户设置</a>
					</div>
				</div>

			</div>
		</div>
		<div class="row quarantine"></div>
		<div class="row">
			<ul class="nav nav-tabs" role="tablist">
				<li role="presentation" class="active"><a href="#home"
					aria-controls="home" role="tab" data-toggle="tab">搜索记录</a></li>

				<li role="presentation"><a href="#profile"
					aria-controls="profile" role="tab" data-toggle="tab"
					class="userSaerch">我的搜搜</a>
				</li>

				<li role="presentation"><a href="#messages"
					aria-controls="messages" role="tab" data-toggle="tab">实事</a></li>

			</ul>

			<!-- Tab panes -->
			<div class="tab-content">
				<div role="tabpanel" class="tab-pane active" id="home">1</div>
				<div role="tabpanel" class="tab-pane" id="profile">
					<%-- <c:forEach items="${list}" var="list">
					${list.description }
					</c:forEach> --%>
				</div>
				<div role="tabpanel" class="tab-pane" id="messages">3</div>

			</div>
			<div class="dataList col-md-12"></div>

		</div>

		<div class="row quarantine"></div>
		<div class="row">
			<ul class="nav nav-tabs">

				<li role="presentation" class="active"><a href="#select"
					aria-controls="messages" role="tab" data-toggle="tab">BUG列表</a>
				<li role="presentation"><a href="#add" aria-controls="messages"
					role="tab" data-toggle="tab">添加BUG</a>
			</ul>

			<div class="tab-content">
				<div role="tabpanel" class="tab-pane active" id="select">1</div>
				<div role="tabpanel" class="tab-pane" id="add">
					<form action="bugInfo/addBug" method="post">
						<div class="bgColor"></div>
						<div>
							<textarea rows="" cols="" class="add_bug" name="description"
								placeholder="请输入BUG描述"></textarea>
						</div>
						<div>
							<script type="text/plain" id="solution" name="solution"></script>
						</div>
						<input type="submit" class="btn btn-default" value="添加" />
					</form>
				</div>

			</div>
			<div class="dataList col-md-12"></div>
		</div>
	</div>
	<script type="text/javascript" src="js/jquery-3.1.1.min.js"></script>
	<script>
		/* var oDataList = $(".dataTop>li");
		var oBudList = $(".dug>li");
		oDataList.on("click", function() {
			$(this).addClass("active").siblings().removeClass("active");
			return false;
		});
		oBudList.on("click", function() {
			$(this).addClass("active").siblings().removeClass("active");
			return false;
		}) */

		var ue = UE.getEditor('solution', {
			toolbars : [ [ 'undo', //撤销
			'redo', //重做
			'selectall', //全选
			'bold', //加粗
			'fontfamily', //字体
			'fontsize', //字号
			'forecolor', //字体颜色
			'backcolor', //背景色
			'indent', //首行缩进
			'italic', //斜体
			'formatmatch', //格式刷
			'removeformat', //清除格式
			'pasteplain', //纯文本粘贴模式
			'touppercase', //字母大写
			'tolowercase', //字母小写
			'date', //日期
			'time', //时间
			'underline', //下划线
			'strikethrough', //删除线
			'subscript', //下标
			'justifyleft', //居左对齐
			'justifyright', //居右对齐
			'justifycenter', //居中对齐
			'justifyjustify', //两端对齐
			'insertorderedlist', //有序列表
			'insertunorderedlist', //无序列表
			'simpleupload', //单图上传
			'insertimage', //多图上传
			'cleardoc', //清空文档

			] ],
			initialFrameWidth : 1170,//富文本宽度
			initialFrameHeight : 400,//富文本高度

		});
	</script>

	<script type="text/javascript">
		$(function() {
			$(".userSaerch").on(
					"click",
					function() {
						$.ajax({
							type : "POST",
							url : "backstage/mySearch",
							async : false,
							success : function(data) {
								var obj = JSON.parse(data);
								alert(typeof obj);
								for ( var i = 0; i < obj.length; i++) {
									var o = obj[i];
									console.log(o);
									$("#profile").append(
											"<div><a href='#' style='color:black;font-size:20px ;margin-top:50px;margin-left:60px'> "+ o["description"]
													+ "</a></div>")
								}
								

							}

						});
					});

		});
	</script>

</body>

</html>